From 92b2e5f15ced138d082426d3759472a910990b27 Mon Sep 17 00:00:00 2001 From: "awilliam@xenbuild2.aw" Date: Thu, 7 Dec 2006 05:43:04 -0700 Subject: [PATCH] [IA64] Send events to VTI domain through level triggered irq. Signed-off-by: Anthony Xu --- xen/arch/ia64/vmx/vmx_process.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/xen/arch/ia64/vmx/vmx_process.c b/xen/arch/ia64/vmx/vmx_process.c index 0aaef9a7c7..94011beb71 100644 --- a/xen/arch/ia64/vmx/vmx_process.c +++ b/xen/arch/ia64/vmx/vmx_process.c @@ -206,28 +206,14 @@ void leave_hypervisor_tail(struct pt_regs *regs) do_softirq(); local_irq_disable(); -// if (user_regs != regs) -// printk("WARNING: checking pending interrupt in nested interrupt!!!\n"); - - /* FIXME: Check event pending indicator, and set - * pending bit if necessary to inject back to guest. - * Should be careful about window between this check - * and above assist, since IOPACKET_PORT shouldn't be - * injected into vmx domain. - * - * Now hardcode the vector as 0x10 temporarily - */ -// if (event_pending(v)&&(!(VLSAPIC_INSVC(v,0)&(1UL<<0x10)))) { -// VCPU(v, irr[0]) |= 1UL << 0x10; -// v->arch.irq_new_pending = 1; -// } - if (v->vcpu_id == 0) { int callback_irq = d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ]; - if (callback_irq != 0) { + if (callback_irq != 0 && local_events_need_delivery()) { /* change level for para-device callback irq */ - viosapic_set_irq(d, callback_irq, local_events_need_delivery()); + /* use level irq to send discrete event */ + viosapic_set_irq(d, callback_irq, 1); + viosapic_set_irq(d, callback_irq, 0); } } -- 2.30.2